<?php

class Graph implements JsonSerializable
{
	private $xAxis;
	private $yAxis;
	private $data;

    public function __construct($xAxis, $yAxis, $data = array())
    {
        $this->setXAxis($xAxis);
		$this->setYAxis($yAxis);
		$this->setData($data);
    }
	
	public function setXAxis($xAxis)
	{
		$this->xAxis =$xAxis;
	}
	
	public function setYAxis($yAxis)
	{
		$this->yAxis =$yAxis;
	}
    
	public function setData($data)
	{
		$this->data =$data;
	}
 
    public function getXAxis()
    {
    	return $this->xAxis;
    }
	
	public function getYAxis()
    {
    	return $this->yAxis;
    }
	
	public function getData()
    {
    	return $this->data;
    }

	public function jsonSerialize()
	{
		$result = array();
		$result['xAxis'] = $this->xAxis;
		$result['yAxis'] = $this->yAxis;
		$result['data'] = $this->data;
		return $result;
	}
}

?>